package com.xh.petdogexpert.expert.common;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class CommonController {

	@RequestMapping(value = "/{htmlName}.html")
	public ModelAndView redirect(@PathVariable(value = "htmlName") String htmlName) {
		ModelAndView modelAndView = new ModelAndView(htmlName);
		return modelAndView;
	}

	@RequestMapping(value = "/{floder}/{htmlName}.html")
	public ModelAndView redirect(@PathVariable(value = "floder") String floder,
			@PathVariable(value = "htmlName") String htmlName) {
		ModelAndView modelAndView = new ModelAndView(floder+"/"+htmlName);
		return modelAndView;
	}
	
}
